package com.roadjava.javaweb.student.dao;

import com.roadjava.javaweb.student.beans.entity.StudentDO;
import com.roadjava.javaweb.student.beans.req.StudentRequest;
import com.roadjava.javaweb.student.beans.res.TableResult;
import com.roadjava.javaweb.student.beans.vo.StudentVO;

import java.util.List;

public interface StudentDao {
    int addStudent(StudentDO studentDO);

    /**
     * 分页查询学生
     * @param studentRequest
     * @return
     */
    TableResult<StudentVO> queryStudentByPage(StudentRequest studentRequest);

    StudentVO getStudentById(long studentId);

    /**
     *
     * @param studentDO
     * @return 影响的条数
     */
    int updateStudent(StudentDO studentDO);

    int deleteStudentById(long studentId);

    List<StudentVO> loadAllStudents();
}
